﻿<phone:PhoneApplicationPage
    x:Class="Photonware.RestUI.SL8.Xamls.ActionResultContentPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:local="clr-namespace:Photonware.RestUI.SL8.Xamls"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="True">

    <phone:PhoneApplicationPage.Resources>
        <Style TargetType="local:ScrollableTextBlock" >
            <Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="FontSize" Value="{StaticResource PhoneFontSizeMedium}"/>
            <Setter Property="Padding" Value="0"/>
            <Setter Property="Width" Value="200" />
            <Setter Property="Height" Value="70" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="local:ScrollableTextBlock">
                        <ScrollViewer x:Name="ScrollViewer" Foreground="{TemplateBinding Foreground}" 
                                  Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" 
                                  BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
                            <StackPanel Orientation="Vertical" x:Name="StackPanel" />
                        </ScrollViewer>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style TargetType="local:EyeableTextBlock" >
            <Setter Property="Foreground" Value="Black"/>
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="FontSize" Value="{StaticResource PhoneFontSizeMedium}"/>
            <Setter Property="Padding" Value="0"/>
            <Setter Property="Width" Value="480" />
            <Setter Property="Height" Value="Auto" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="local:EyeableTextBlock">
                        <StackPanel Orientation="Vertical" x:Name="StackPanel"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </phone:PhoneApplicationPage.Resources>

    
    <!--LayoutRoot 是包含所有页面内容的根网格-->
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="100"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid Background="DodgerBlue" Height="100" VerticalAlignment="Top">
        </Grid>
        <!--TitlePanel 包含应用程序的名称和页标题-->
        <StackPanel Grid.Row="0" Margin="12,17,0,15">
            <!--TextBlock Text="Content" Style="{StaticResource PhoneTextNormalStyle}"/-->
            <TextBlock x:Name="titleBox" Text="{Binding Title}" Margin="9,-7,0,0" Style="{StaticResource PhoneTextNormalStyle}" Foreground="White"/>
            <TextBlock x:Name="statusBox" Text="{Binding StatusText}" Margin="9,2,0,0" Style="{StaticResource PhoneTextSmallStyle}" Foreground="White"/>
        </StackPanel>
        <phone:WebBrowser FontSize="16" x:Name="textBox" HorizontalAlignment="Stretch" IsScriptEnabled="False" Margin="12,12,12,12" Grid.Row="1" VerticalAlignment="Stretch"/>
        <!--<local:ScrollableTextBlock x:Name="textBox" Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="12,10,10,10" Height="Auto" Width="Auto">
            
        </local:ScrollableTextBlock>-->


        <!--<ScrollViewer Grid.Row="1" Height="576" HorizontalAlignment="Stretch" Margin="12,0,12,0" Name="scrollViewer1" VerticalAlignment="Stretch" Width="Auto" VerticalScrollBarVisibility="Visible">
            <local:ScrollableTextBlock Name="textBox" Text="TextBlock" Foreground="Black" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto"/>
        </ScrollViewer>-->
        <!--<Grid Grid.Row="1" Margin="12,0,12,0">
            <Grid.Children>
                <ScrollViewer HorizontalAlignment="Left" Margin="0,0,0,0" Name="scrollViewer" VerticalAlignment="Top" Width="456">
                    <Grid x:Name="ContentPanel" Margin="0,0,0,0" Width="456">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        <local:EyeableTextBlock Grid.Row="2" x:Name="textBlockContent" Width="456" FontSize="22" FontWeight="ExtraLight" FontFamily="Lucida Sans Unicode" Text="" Padding="0,1" />
                    </Grid>
                </ScrollViewer>
            </Grid.Children>
        </Grid>-->
    </Grid>

    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" >
            <shell:ApplicationBarIconButton x:Name="copyButton" IconUri="/Assets/Copy.png" Text="Copy" Click="copyButton_Click"/>
            <!--<shell:ApplicationBarIconButton x:Name="resetButton" IconUri="/Assets/Undo.png" Text="reset"/>
            <shell:ApplicationBarIconButton x:Name="wrapButton" IconUri="/Assets/Align-left.png" Text="wrap"/-->
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>